package com.ruicar.afs.cloud.admin.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruicar.afs.cloud.admin.entity.SysTenantInfo;
import com.ruicar.afs.cloud.admin.mapper.SysTenantInfoMapper;
import com.ruicar.afs.cloud.admin.service.SysTenantInfoService;
import org.springframework.stereotype.Service;

/**
 * The type SysTenantInfoServiceImpl.
 * <p>
 * Created on 2019-03-19
 *
 * @author Fzero
 */
@Service
public class SysTenantInfoServiceImpl extends ServiceImpl<SysTenantInfoMapper, SysTenantInfo> implements SysTenantInfoService {
	/**
	 * Gets tenant info by tenant id.
	 *
	 * @param tenantId the tenant id
	 * @return the tenant info by tenant id
	 */
	@Override
	public SysTenantInfo getTenantInfoByTenantId(String tenantId) {
		return this.baseMapper.selectOne(Wrappers.<SysTenantInfo>query().lambda().eq(SysTenantInfo::getTenantId,tenantId));
	}
}
